<template>
	<view class="">
		<view class="searchBar">
			<image @click="goOne" src="../../static/左键.png"></image>
			<text>我的订单</text>
			<view class="">
				<image src="../../static/搜索.png" mode=""></image>
				<image src="../../static/更多.png" mode=""></image>
			</view>
		</view>
	<!-- 	<view class="box1-1">
			<text class="wen">全部</text>
			<text>待付款</text>
			<text>待发货</text>
			<text>待收货</text>
			<text>评价</text>
			<text>售后</text>
		</view> -->
		<view class="box11">
			<view class="uni-padding-wrap uni-common-mt">
				<uni-segmented-control :current="current" :values="items" :style-type="styleType"
					:active-color="activeColor" @clickItem="onClickItem" />
			</view>
			<view class="content">
				<view v-if="current === 0">
					<view class="box">
						<view class="">
							<image src="../../static/购物车.png" mode=""></image>
							<text>暂时没有订单哦</text>
						</view>
					</view>
					<view class="box1">
						<text>猜你喜欢</text>
						<view class="tax" v-for="item in spData">
							<view>
								<image :src="item.spimg" mode="widthFix"></image>
								<text>{{item.spname}}</text>
								<p>￥{{item.money}}</p>
							</view>
							<view>
								<image :src="item.spimg2" mode="widthFix"></image>
								<text>{{item.spname2}}</text>
								<p>￥{{item.money2}}</p>
							</view>
						</view>
					</view>
				</view>
				<view v-if="current === 1">
					<view class="box">
						<view class="">
							<image src="../../static/购物车.png" mode=""></image>
							<text>暂时没有订单哦</text>
						</view>
					</view>
					<view class="box1">
						<text>猜你喜欢</text>
						<view class="tax" v-for="item in spData">
							<view>
								<image :src="item.spimg" mode="widthFix"></image>
								<text>{{item.spname}}</text>
								<p>￥{{item.money}}</p>
							</view>
							<view>
								<image :src="item.spimg2" mode="widthFix"></image>
								<text>{{item.spname2}}</text>
								<p>￥{{item.money2}}</p>
							</view>
						</view>
					</view>
				</view>
				<view v-if="current === 2">
					<view class="box">
						<view class="">
							<image src="../../static/购物车.png" mode=""></image>
							<text>暂时没有订单哦</text>
						</view>
					</view>
					<view class="box1">
						<text>猜你喜欢</text>
						<view class="tax" v-for="item in spData">
							<view>
								<image :src="item.spimg" mode="widthFix"></image>
								<text>{{item.spname}}</text>
								<p>￥{{item.money}}</p>
							</view>
							<view>
								<image :src="item.spimg2" mode="widthFix"></image>
								<text>{{item.spname2}}</text>
								<p>￥{{item.money2}}</p>
							</view>
						</view>
					</view>
				</view>
				<view v-if="current === 3">
					<view class="box">
						<view class="">
							<image src="../../static/购物车.png" mode=""></image>
							<text>暂时没有订单哦</text>
						</view>
					</view>
					<view class="box1">
						<text>猜你喜欢</text>
						<view class="tax" v-for="item in spData">
							<view>
								<image :src="item.spimg" mode="widthFix"></image>
								<text>{{item.spname}}</text>
								<p>￥{{item.money}}</p>
							</view>
							<view>
								<image :src="item.spimg2" mode="widthFix"></image>
								<text>{{item.spname2}}</text>
								<p>￥{{item.money2}}</p>
							</view>
						</view>
					</view>
				</view>
				<view v-if="current === 4">
					<view class="box">
						<view class="">
							<image src="../../static/购物车.png" mode=""></image>
							<text>暂时没有订单哦</text>
						</view>
					</view>
					<view class="box1">
						<text>猜你喜欢</text>
						<view class="tax" v-for="item in spData">
							<view>
								<image :src="item.spimg" mode="widthFix"></image>
								<text>{{item.spname}}</text>
								<p>￥{{item.money}}</p>
							</view>
							<view>
								<image :src="item.spimg2" mode="widthFix"></image>
								<text>{{item.spname2}}</text>
								<p>￥{{item.money2}}</p>
							</view>
						</view>
					</view>
				</view>
				<view v-if="current === 5">
					<view class="box">
						<view class="">
							<image src="../../static/购物车.png" mode=""></image>
							<text>暂时没有订单哦</text>
						</view>
					</view>
				</view>
			</view>
			
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				items: ['全部', '待付款', '待发货','待收货', '评价', '售后'],
				current: 0,
				activeColor: '#ff0000',
				styleType: 'text',
				spData: [{
						spimg: '../../static/ww1.jpg',
						spname: '简黛 . 果酸烟酰胺沐浴露保湿香体滋润持久留香家',
						money: 28,
						spimg2: '../../static/ww2.jpg',
						spname2: '吾禾 . 日系富士山INS和风美瞳盒莫兰迪色系隐形眼',
						money2: 9.9
					},
					{
						spimg: '../../static/ww3.jpg',
						spname: '仙蒂奈儿 · 固体香膏持久留香淡香女士学生平价小',
						money: 9.9,
						spimg2: '../../static/ww4.jpg',
						spname2: '魔香 · 小苍兰洗发水控油蓬松去屑止痒洗头膏护发',
						money2: 59
					},
					{
						spimg: '../../static/ww5.jpg',
						spname: 'ROZO·少女清新持久淡香女士香水自然蜜桃香橙桂',
						money: 23.5,
						spimg2: '../../static/ww6.jpg',
						spname2: '吾禾·潮酷棋盘格黑白简约cool美瞳盒潮系男女通用',
						money2: 9.9
					},
					{
						spimg: '../../static/ww7.jpg',
						spname: '简黛·小众实验室香水沐浴露持久留香清爽补水男',
						money: 29,
						spimg2: '../../static/ww8.jpg',
						spname2: '仙蒂奈儿·雕花口红套装丝绒哑光雾面不掉色送闺',
						money2: 30.8
					},
					{
						spimg: '../../static/ww9.jpg',
						spname: '薇亦朦·茶香师香水试香',
						money: 4,
						spimg2: '../../static/ww10.jpg',
						spname2: 'NNUEDWE·正品粉饼定妆散蜜粉控油定妆持久防水',
						money2: 38
					}

				]
			}
		},
		methods: {
			onClickItem(e) {
				if (this.current !== e.currentIndex) {
					this.current = e.currentIndex
				}
			},
			goOne() {
				uni.switchTab({
					url: "../shopping/shopping"
				})
			},
		}
	}
</script>

<style lang="scss">
	@import "one.scss"
</style>
